package com.zhj.user.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * 用户表
 */
@Data
@ApiModel("用户通用实体类")
public class UserDTO {

    @ApiModelProperty(value = "用户名", name = "username", example = "zhj", required = true)
    @NotEmpty(message = "用户名不能为空")
    private String username;

    @ApiModelProperty(value = "密码", name = "password", example = "123456", required = true)
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, max = 10, message = "密码长度不能小于6，大于10")
    private String password;

}